package com.eca.emas.daemon.shared;

import java.io.Serializable;

public class Sensor implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 5802839631803136080L;
	private String sensorID;
	private String sensorName;

	public Sensor(String sensorID, String sensorName) {
		super();
		this.sensorID = sensorID;
		this.sensorName = sensorName;
	}

	public Sensor() {

	}

	public String getSensorID() {
		return sensorID;
	}

	public void setSensorID(String sensorID) {
		this.sensorID = sensorID;
	}

	public String getSensorName() {
		return sensorName;
	}

	public void setSensorName(String sensorName) {
		this.sensorName = sensorName;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((sensorID == null) ? 0 : sensorID.hashCode());
		result = prime * result
				+ ((sensorName == null) ? 0 : sensorName.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Sensor other = (Sensor) obj;
		if (sensorID == null) {
			if (other.sensorID != null)
				return false;
		} else if (!sensorID.equals(other.sensorID))
			return false;
		if (sensorName == null) {
			if (other.sensorName != null)
				return false;
		} else if (!sensorName.equals(other.sensorName))
			return false;
		return true;
	}

}
